const mtjwxsdk = require('./utils/mtj-wx-sdk.js')
import Vue from 'vue'
import App from './App'

import constants from '@/constant/index'
Vue.prototype.$constant = constants
import './static/iconfont/iconfont.css'
// vue 指令
import directives from '@/directives/isShow'
// import directives from '@/directives/index'
Vue.use(directives)

// 全局bus事件
Vue.prototype.$eventBus = new Vue()

import util from './utils/util'
Vue.prototype.$util = util

import { FormatTimeFilter } from '@/filters/index'
Vue.filter('formatTime', FormatTimeFilter)

import commonJS from './utils/common'
Vue.prototype.commonJS = commonJS

import globalMixins from './mixins/globalMixins'
Vue.mixin(globalMixins)

Vue.config.productionTip = false

import store from './store'
Vue.prototype.$store = store

Vue.prototype.$toast = (title) => (
	uni.showToast({
		title,
		icon: 'none'
	})
)

// 生产环境中控制台不打印普通信息，以免造成内存泄漏
if (process.env.NODE_ENV == 'production') {
	if (console) {
		console.log = () => {}
	}
}

App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()
